<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <input id="txt" />
    <script src="./node_modules/lodash/lodash.js"></script>
    <script>
        // 说话的时候 怎么证明一个人话说完了 一段时间内不再说话
        // var timer;
        // txt.oninput = function(){
        //     clearTimeout(timer)
        //     timer = setTimeout(function(){
        //         console.log(123)
        //     },300)
        // }
        txt.oninput = _.debounce(function(){
            console.log(123)
        },300)
    </script>
</body>
</html>